package com.appwoo.txtws.adapter;

import android.content.Context;
import android.graphics.BitmapFactory;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.appwoo.txtws.bean.AutoSoftInfo;
import java.util.ArrayList;

public class DialogGridViewAdapter extends BaseAdapter
{
  private ArrayList<AutoSoftInfo> al;
  private Context context;

  public DialogGridViewAdapter(Context paramContext, ArrayList<AutoSoftInfo> paramArrayList)
  {
    this.al = paramArrayList;
    this.context = paramContext;
  }

  public int getCount()
  {
    return this.al.size();
  }

  public Object getItem(int paramInt)
  {
    return this.al.get(paramInt);
  }

  public long getItemId(int paramInt)
  {
    return paramInt;
  }

  public View getView(int paramInt, View paramView, ViewGroup paramViewGroup)
  {
    LinearLayout localLinearLayout = (LinearLayout)LayoutInflater.from(this.context).inflate(2130903105, null);
    ImageView localImageView = (ImageView)localLinearLayout.findViewById(2131493116);
    TextView localTextView = (TextView)localLinearLayout.findViewById(2131493036);
    localImageView.setImageBitmap(BitmapFactory.decodeFile(((AutoSoftInfo)this.al.get(paramInt)).getAdicon()));
    localImageView.setBackgroundResource(2130837742);
    if (((AutoSoftInfo)this.al.get(paramInt)).getAsname().length() > 8)
    {
      localTextView.setText(((AutoSoftInfo)this.al.get(paramInt)).getAsname().substring(0, 8));
      return localLinearLayout;
    }
    localTextView.setText(((AutoSoftInfo)this.al.get(paramInt)).getAsname());
    return localLinearLayout;
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.adapter.DialogGridViewAdapter
 * JD-Core Version:    0.6.2
 */